package com.df.bpm.utils.businessViewerV2.human;

import com.df.bpm.utils.businessViewerV2.Main;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;

import java.util.List;

public class Db_human {

    public List<M_human> getList4Like(M_human temp) {
        RestTemplate restTemplate = new RestTemplate();
        String tempString=Main.printNonNullFields(temp);
        String url=Main.server.replace("businessOverview","human")+"employeeList/4Like?"+tempString;
        ResponseEntity<List<M_human>> response = restTemplate.exchange(
                url,
                HttpMethod.GET,
                null, // 或者使用 HttpEntity 来添加请求头等信息
                new ParameterizedTypeReference<List<M_human>>() {}
        );
        return response.getBody();
    }


}
